import { IsNotEmpty, MinLength, IsEmail } from 'class-validator';
export class LoginDto {
  @IsNotEmpty({
    message: '用户名不能为空',
  })
  @IsEmail(
    {},
    {
      message: '用户名必须是邮箱地址',
    },
  )
  username: string;

  @IsNotEmpty({
    message: '密码不能为空',
  })
  @MinLength(6, {
    message: '密码不能不少于6位',
  })
  password: string;
}
